/* 
 This C File "Save_Business.c" 
 Genenated By
 Application <comAction> v1.0
 with the com file "Save_Business.def".
 Create: Wed May 31 18:06:51 2017
*/

#include <stdio.h>
#include "Save_Business.h"

int ABRCP_pkg_Save_Business(void *v_data, char *buf, int buflen, int *useP, int in_out)
{
	int	r;
	Save_Business *data;
	data=(Save_Business *)v_data;

	r = ABRCP_in_out_long(&data->trans_no, 4, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_long(&data->cycle_no, 4, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_long(&data->recv_trans_no, 4, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_long(&data->recv_cycle_no, 4, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->process_code, 8, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->card_category, 4, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->card_type, 2, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->card_no, 20, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->card_no2, 20, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->acc_type, 3, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->merchant_no, 20, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->trans_type, 2, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->auth_code, 6, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->customer_id, 9, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->name, 20, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->addr, 40, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->post_code, 8, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->id_type, 2, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->personal_id, 20, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->name2, 40, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->id_type2, 2, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->personal_id2, 20, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->cert_no, 14, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->tel_code, 20, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->mode, 1, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->stored_passwd, 16, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->trans_acc, 36, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->trans_oth_acc, 36, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->subject_no, 7, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->deposit_type, 2, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->server_mode, 1, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->summary, 6, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->trans_node, 16, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->origin_agency, 11, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->agent_agency, 11, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->account_state, 2, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->cash_or_bill_flag, 1, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->turn_flag, 1, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->remote_trans_flag, 1, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->open_date, 10, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->interested_date, 10, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->due_date, 10, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->trans_date, 10, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_double(&data->trans_booking_amt, 8, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_short(&data->deposit_period, 2, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_short(&data->trans_interval, 2, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_short(&data->set_times, 2, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_long(&data->trans_jnls_no, 4, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_short(&data->printed_cnt, 2, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_short(&data->unprint_cnt, 2, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->summary_name, 10, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->trans_agency, 11, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_double(&data->trans_amt, 8, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_double(&data->interest, 8, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_short(&data->detail_cnt, 2, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_double(&data->rate, 8, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_double(&data->last_balance, 8, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_double(&data->balance, 8, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_double(&data->aggr, 8, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_double(&data->over_amt, 8, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_double(&data->total_over, 8, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->currency_type, 2, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->currency_type2, 2, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->cash_or_spot, 2, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->cash_or_spot2, 2, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_double(&data->exchange_rate, 8, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_double(&data->exchange_rate2, 8, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->begin_lottery_num, 9, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->end_lottery_num, 9, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_double(&data->bonus, 8, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_double(&data->oth_amt, 8, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_double(&data->fee_amt, 8, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->nation_debt_name, 20, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->open_amt_flag, 1, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->trans_info, 20, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_long(&data->response_code, 4, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->tty_no, 20, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->operator, 6, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->operator_PIN, 16, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->author, 6, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->author_PIN, 16, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->district_code, 5, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->sub_bank_code, 2, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;

	r = ABRCP_in_out_str(data->exchange_code, 5, buf, buflen, useP, in_out);
	if (r != 0)
		goto E;
E:
	return(r);
}
